#include "stdafx.h"
int main(int argc,char* argv[]) 
{ 
	if(daemon_init() == -1) 
	{ 
		printf("ftpd can't run in daemon\n"); 
		exit(0); 
	} 
	//openlog("ftpd", LOG_PID|LOG_CONS, LOG_USER); 
	//syslog(LOG_INFO, "ftpd started"); 
	signal(SIGTERM, sig_term);
	Ctftpd tftpd;
	tftpd.Run();
	//closelog();
	return(0); 
}